package domain.entities;

import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 * ProtocoloCompromisopaisId entity. @author MyEclipse Persistence Tools
 */
@Embeddable
public class ProtocoloCompromisopaisId implements java.io.Serializable {

	// Fields

	private String protocoloid;
	private Integer compromisopaisid;

	// Constructors

	/** default constructor */
	public ProtocoloCompromisopaisId() {
	}

	/** full constructor */
	public ProtocoloCompromisopaisId(String protocoloid,
			Integer compromisopaisid) {
		this.protocoloid = protocoloid;
		this.compromisopaisid = compromisopaisid;
	}

	// Property accessors

	@Column(name = "protocoloid", nullable = false)
	public String getProtocoloid() {
		return this.protocoloid;
	}

	public void setProtocoloid(String protocoloid) {
		this.protocoloid = protocoloid;
	}

	@Column(name = "compromisopaisid", nullable = false)
	public Integer getCompromisopaisid() {
		return this.compromisopaisid;
	}

	public void setCompromisopaisid(Integer compromisopaisid) {
		this.compromisopaisid = compromisopaisid;
	}

	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof ProtocoloCompromisopaisId))
			return false;
		ProtocoloCompromisopaisId castOther = (ProtocoloCompromisopaisId) other;

		return ((this.getProtocoloid() == castOther.getProtocoloid()) || (this
				.getProtocoloid() != null
				&& castOther.getProtocoloid() != null && this.getProtocoloid()
				.equals(castOther.getProtocoloid())))
				&& ((this.getCompromisopaisid() == castOther
						.getCompromisopaisid()) || (this.getCompromisopaisid() != null
						&& castOther.getCompromisopaisid() != null && this
						.getCompromisopaisid().equals(
								castOther.getCompromisopaisid())));
	}

	public int hashCode() {
		int result = 17;

		result = 37
				* result
				+ (getProtocoloid() == null ? 0 : this.getProtocoloid()
						.hashCode());
		result = 37
				* result
				+ (getCompromisopaisid() == null ? 0 : this
						.getCompromisopaisid().hashCode());
		return result;
	}

}